package com.dc.project.entity.map;

import com.dc.project.entity.po.Task;
import com.own.component.common.base.entity.BaseMap;
import com.own.constant.ConstantBeanSuffix;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * TaskMapVo
 *
 * @author chenxueli
 * @date 2025-03-08 15:11:52
 */
@Schema(title = "任务" + ConstantBeanSuffix.MAP_VO)
@Getter
@Setter
@ToString
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class TaskMapVo extends BaseMap<Task> implements Serializable {

    @Schema(title = "企业名称")
    private String companyName;

    @Schema(title = "任务标题")
    private String title;

    @Schema(title = "任务状态")
    private Integer status;

    @Schema(title = "任务类型 1=根据自定义文件创建 2=根据模板生成")
    private Integer type;

    @Schema(title = "模板key")
    private String templateKey;

    @Schema(title = "是否热门 1=是 2=否")
    private Integer isHot;

    @Schema(title = "领域名称")
    private String realmName;

    @Schema(title = "是否是加密数据 1=是 0=不是")
    private Integer isEncrypt;

    @Schema(title = "访问密码")
    private String password;

    @Schema(title = "任务提示词")
    private String prompt;

    /**
     * 构造方法
     *
     * @param entity 原对象
     */
    public TaskMapVo(@NonNull Task entity) {
        super(entity);
        this.companyName = entity.getCompanyName();
        this.title = entity.getTitle();
        this.status = entity.getStatus();
        this.type = entity.getType();
        this.templateKey = entity.getTemplateKey();
        this.isHot = entity.getIsHot();
        this.realmName = entity.getRealmName();
        this.isEncrypt = entity.getIsEncrypt();
        this.password = entity.getPassword();
        this.prompt = entity.getPrompt();
    }

}
